/**
 * 
 */
package models.enumtype;

import java.util.HashMap;
import java.util.Map;

/**
 * The Enum ActiveType.
 * 
 * @author huytran
 */
public enum StaffRoleType {
    
	NVBH(1),
	
	GSNPP (2),
	
	TBHV (3),
	
	KT(4),
	
	GDM(5),
	
	VNM(6),    
	
	VNM_GSM (7),
	
	GSKA(10),
	
	TBHVKA(11),
	
	GDMKA(12),
	    
	GSMT(20),

	TBHVMT(21);

    /** The value. */
    private Integer value;
    
    /** The values. */
    private static Map<Integer, StaffRoleType> values = null;
    
    /**
     * Gets the value.
     * 
     * @return the value
     */
    public Integer getValue() {
        return value;
    }
    
    /**
     * Instantiates a new gender type.
     * 
     * @param value
     *            the value
     */
    StaffRoleType(Integer value) {
        this.value = value;
    }
    
    /**
     * Parses the value.
     * 
     * @param value
     *            the value
     * @return the gender type
     */
    public static StaffRoleType parseValue(Integer value) {
    	if (value != null && value == -1){
    		value = -2;
    	}    		
        if (values == null) {
            values = new HashMap<Integer, StaffRoleType>(
                    StaffRoleType.values().length);
            for (StaffRoleType e : StaffRoleType.values())
                values.put(e.getValue(), e);
        }
        return values.get(value);
    }
}
